var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
    })(e, t);
}, function(e, t) {
    function n() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, 
    new n());
}), a = this && this.__decorate || function(e, t, n, a) {
    var o, l = arguments.length, r = l < 3 ? t : null === a ? a = Object.getOwnPropertyDescriptor(t, n) : a;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, n, a); else for (var i = e.length - 1; 0 <= i; i--) (o = e[i]) && (r = (l < 3 ? o(r) : 3 < l ? o(t, n, r) : o(t, n)) || r);
    return 3 < l && r && Object.defineProperty(t, n, r), r;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("PrefabView"), s = e("PeakRankView"), c = e("AudioManager"), l = e("Global"), d = e("GameManager"), u = e("BaseView"), p = e("GameConfig"), h = e("GameData"), f = e("UIManager"), g = e("WebManager"), m = cc._decorator, y = m.ccclass, v = m.property, w = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.rankView = null, e;
    }
    return i(e, t), e.prototype.onClickPlay = function() {
        c.default.getInstance().playAudio("按钮2"), g.default.getInstance().sentLog("点击巅峰界面开始按键"), 
        f.default.getInstance().preloadPnl("game2"), d.default.getInstance().matchType = d.MatchType.三对三, 
        -1 < l.G.seasoncount && h.GD.seasonRewardTime < h.GD.seasonLastTime && !h.GD.isReward ? (cc.log("赛季奖励未领取"), 
        f.default.getInstance().loadPopPnl("season_reward")) : l.G.platform != l.Platform.XiaoDu ? !p.GC.isVaild("empty") && h.GD.petDataList.some(function(e, t) {
            return e && e.has && l.G.chargeList[t];
        }) && (p.GC.isCircle && !p.GC.isVaild("try") && h.GD.tryFailCount >= p.GC.cancelTryCount && (h.GD.topRank < l.G.gunModelList.length || h.GD.skins.length < l.G.personModelList.length) && (h.GD.emptyFailCount = 0, 
        h.GD.tryFailCount = 0), h.GD.emptyFailCount < p.GC.cancelEmptyCount) ? f.default.getInstance().loadPnl("empty") : !p.GC.isVaild("try") && h.GD.tryFailCount < p.GC.cancelTryCount && (h.GD.topRank < l.G.gunModelList.length || h.GD.skins.length < l.G.personModelList.length) ? f.default.getInstance().loadPopPnl("try") : d.default.getInstance().battleGame() : d.default.getInstance().battleGame();
    }, e.prototype.onClickReward = function() {
        var t = this;
        c.default.getInstance().playAudio("按钮2"), g.default.getInstance().sentLog("点击巅峰界面奖励按键"), 
        f.default.getInstance().loadPnl("peakReward").then(function(e) {
            e instanceof u.default && (e.referrerInfo.text = t.text), t.hidePnl();
        });
    }, e.prototype.onClickBack = function() {
        c.default.getInstance().playAudio("按钮2"), g.default.getInstance().sentLog("点击巅峰界面返回按键"), 
        this.hidePnl(), f.default.getInstance().showPnl("start");
    }, e.prototype.start = function() {
        this.rankView.doStart();
    }, a([ v(s.default) ], e.prototype, "rankView", void 0), a([ y ], e);
}(r.default);

n.default = w;